package com.customview;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;

/**
 * Created by sq on 2017/12/11.
 */

public class ScrollViewpager extends ViewPager {
    public ScrollViewpager(Context context) {
        super(context);
    }

    public ScrollViewpager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) {
        if (v instanceof HorizontalListView) {
            return true;
        }
        return super.canScroll(v, checkV, dx, x, y);
    }
}
